package com.tkjt.pms.server.common;

import com.tkjt.pms.calc.common.IndexCalcConsts;
import com.tkjt.pms.server.ServerService;

public class InnerServerTask extends ServerTask implements Runnable {

	protected ServerService serverService;

	public InnerServerTask(ServerParam serverParam) {
		super(serverParam);
		// this.serverParam.serverType = serverParam.serverType;
		// this.serverParam.serverServiceName = serverParam.serverServiceName;
		// this.serverParam.params = new HashMap<String, Object>(serverParam.getParams());
	}

	public void setServerService(ServerService serverService) {
		this.serverService = serverService;
	}

	public String getServerServiceName() {
		return this.serverParam.getServerServiceName();
	}

	public String getServerType() {
		return (String) this.serverParam.getParam(IndexCalcConsts.PARAM_SERVER_TYPE);
	}

	@Override
	public void run() {

		serverService.doService(serverParam);
	}

}
